<include file="Public:header" />
<form id="info_form" action="{:U('Business/edit')}" method="post" enctype="multipart/form-data">
<div class="pad_lr_10">
	<div class="col_tab">
		<ul class="J_tabs tab_but cu_li">
            <li class="current">{:L('article_basic')}</li>
            <li>销售信息</li>
            <li>详细内容</li>
            <li>{:L('article_seo')}</li>
		</ul>
		<div class="J_panes">
			<div class="content_list pad_10">
				<table width="100%" cellspacing="0" class="table_form">
                    <tr>
					<tr>
						<th width="120">所属区域 :</th>
						<td><select class="J_cate_select mr10" data-pid="0" data-menuid="1" data-uri="{:U('House/ajaxGetchilds')}" data-selected="{$selected_ids}"></select>
                			<input type="hidden" name="area_id" id="J_cate_id" value="{$info.area_id}" /></td>
					</tr>
                    <tr>
                        <th>楼盘名称 :</th>
                        <td>
                            <input type="text" name="title" id="J_title" value="{$info.title}" class="input-text" size="50">
                            <!--input type="hidden" value="" name="color" id="J_color">
                            <a href="javascript:;" class="color_picker_btn"><img class="J_color_picker" data-it="J_title" data-ic="J_color" src="__IMG__/color.png"></a-->
                        </td>
                    </tr>
                    <tr>
                        <th>副标题 :</th>
                        <td><input type="text" name="short_title" id="J_short_title" class="input-text" value="{$info.short_title}" size="40" /></td>
                    </tr>
                    <tr>
                        <th>楼盘均价 :</th>
                        <td>
                            <input type="text" name="price" id="J_price" value="{$info.price}" class="input-text" size="10" /><span>元/平米</span>
                            最低首付 :
                            <input type="text" name="shoufu" id="J_shoufu" class="input-text" value="{$info.shoufu}" size="10" /> <span>万元</span>

                        </td>
                    </tr>
                    <tr>
                        <th>楼盘状态 :</th>
                        <td>{:getLinkMenu(4,'housestatus','radio',$info['housestatus'])}</td>
                    </tr>
                    <tr id="opentime" <if condition="$info['housestatus'] eq 52">style="display:none;"</if>>
                        <th>开盘时间 :</th>
                        <td>
                            <input type="text" name="opentime" id="J_opentime" onclick="myCalendar();" <if condition="$info['opentime'] gt 0">value="{$info.opentime|date='Y-m-d',###}"</if> class="date" size="12" />
                            交房时间 :
                            <input type="text" name="roomtime" id="J_roomtime" onclick="myCalendar();" <if condition="$info['roomtime'] gt 0">value="{$info.roomtime|date='Y-m-d',###}"</if> class="date" size="12" />
                        </td>
                    </tr>

                    <tr>
                        <th>地图标注：</th>
                        <td>
                            <input type="text" name="map" id="map" class="input-text" size="27" value="{$info.map}"/>
                            <input type="button" value="地图标注" data-height="500" data-width="600" data-id="add" data-uri="{:U('Map/index')}" data-title="编辑 - 地图坐标" class="J_showmap btn btn_submit" />
                        </td>
                    </tr>
                    <tr>
                        <th>所在版块 :</th>
                        <td>{:getLinkMenu(6,'bankuai','radio',$info['bankuai'])}</td>
                    </tr>
                    <volist name="typearr" id="vo">
                        <tr>
                            <th>{$key} :</th>
                            <td>{$vo}</td>
                        </tr>
                    </volist>
                    <tr>
                        <th>投资评级 :</th>
                        <td>{:getLinkMenu(14,'spin','radio',$info['spin'])}</td>
                    </tr>
                    <!--tr>
                        <th>轨道交通 :</th>
                        <td>{:getLinkMenu(8,'jiaotong','radio',$info['jiaotong'])}</td>
                    </tr>
                    <tr>
                        <th>环线 :</th>
                        <td>{:getLinkMenu(7,'huanxian','radio',$info['huanxian'])}</td>
                    </tr-->

                    <tr>
                        <th>楼盘地址 :</th>
                        <td><input type="text" name="address" id="address" value="{$info.address}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>售楼处地址 :</th>
                        <td><input type="text" name="selleraddress" id="selleraddress" value="{$info.selleraddress}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>售楼处电话 :</th>
                        <td><input type="text" name="telphone" id="telphone" value="{$info.telphone}" class="input-text" size="30"/> </td>
                    </tr>
                    <tr>
                        <th>缩略图:</th>
                        <td>
                            <notempty name="info['img']">
                                <img src="{$info.img}" width="100" height="100"/><br /></notempty>
                            <input type="file" name="img" class="input-text"  style="width:200px;" />
                        </td>
                    </tr>
                    <tr>
                        <th>logo图片:</th>
                        <td>
                            <input type="text" name="logoimg" id="J_img" value="{$info.logoimg}" class="input-text fl mr10" size="30">
                            <div id="J_upload_img" class="upload_btn"><span onclick="javascript:ajaxUpload('J_img','J_upload_img');">{:L('upload')}</span></div>图片尺寸：140*70
                        </td>
                    </tr>
                    <tr>
                        <th>详细页大图:</th>
                        <td>
                            <input type="text" name="thumb" id="J_thumb" class="input-text fl mr10" value="{$info.thumb}" size="30">
                            <div id="J_upload_thumb" class="upload_btn"><span onclick="javascript:ajaxUpload('J_thumb','J_upload_thumb');">{:L('upload')}</span></div>
                        </td>
                    </tr>
                    <tr>
                        <th>特色标签 :</th>
                        <td>
                            <textarea name="tags" style="width:400px;height:50px;">{$info.tags}</textarea>多个标签请用','号隔开
                        </td>
                    </tr>
                    <tr>
                        <th>独家优惠 :</th>
                        <td><textarea name="coupons" style="width:500px;height:100px;resize: none;">{$info.coupons}</textarea></td>
                    </tr>

                    <tr>
                        <th>{:L('publish')} :</th>
                        <td>
                            <label><input type="radio" name="status" class="radio_style" value="1" <if condition="$info.status eq '1'">checked="checked"</if>> {:L('yes')}</label>&nbsp;&nbsp;
                            <label><input type="radio" name="status" class="radio_style" value="0" <if condition="$info.status eq '0'">checked="checked"</if>> {:L('no')}</label>
                        </td>
                    </tr>
				</table>
			</div>
            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th width="100">支持贷款的银行 :</th>
                        <td><textarea name="sale[bank]" style="width:500px;height:40px; resize: none;">{$sale.bank}</textarea></td>
                    </tr>
                    <tr>
                        <th>支持的付款方式 :</th>
                        <td><textarea name="sale[fukuan]" style="width:500px;height:40px; resize: none;">{$sale.fukuan}</textarea></td>
                    </tr>
                    <tr>
                        <th>在售楼栋 :</th>
                        <td><textarea name="sale[online]" style="width:500px;height:40px; resize: none;">{$sale.online}</textarea></td>
                    </tr>
                    <tr>
                        <th>工程进度 :</th>
                        <td><textarea name="sale[jindu]" style="width:500px;height:40px; resize: none;">{$sale.jindu}</textarea></td>
                    </tr>
                    <tr>
                        <th>交通状况 :</th>
                        <td><textarea name="sale[bus]" style="width:500px;height:40px; resize: none;">{$sale.bus}</textarea></td>
                    </tr>
                    <tr>
                        <th>车位信息 :</th>
                        <td><textarea name="data[chewei]" style="width:500px;height:40px; resize: none;">{$data.chewei}</textarea></td>
                    </tr>
                </table>
            </div>

            <div class="content_list pad_10 hidden">
                <table width="100%" cellspacing="0" class="table_form">
                    <tr>
                        <th>楼盘优点 :</th>
                        <td><textarea name="special" id="special" style="width:500px;height:50px;resize: none;">{$info.special}</textarea></td>
                    </tr>
                    <tr>
                        <th>楼盘缺点 :</th>
                        <td><textarea name="quedian" id="quedian" style="width:500px;height:50px;resize: none;">{$info.quedian}</textarea></td>
                    </tr>
                    <tr>
                        <th>项目介绍 :</th>
                        <td><script id="info" name="info" type="text/plain">{$info.info}</script></td>
                    </tr>
                </table>
            </div>
			<div class="content_list pad_10 hidden">
				<table width="100%" cellspacing="0" class="table_form">
					<tr>
						<th width="120">{:L('seo_title')} :</th>
		 				<td><input type="text" name="seo_title" id="seo_title" class="input-text" size="60" value="{$info.seo_title}"></td>
					</tr>
					<tr>
						<th>{:L('seo_keys')} :</th>
						<td><input type="text" name="seo_keys" id="seo_keys" class="input-text" size="60" value="{$info.seo_keys}"></td>
					</tr>
					<tr>
						<th>{:L('seo_desc')} :</th>
						<td><textarea name="seo_desc" id="seo_desc" cols="80" rows="8">{$info.seo_desc}</textarea></td>
					</tr>
				</table>
			</div>


        </div>
		<div class="mt10"><input type="submit" value="{:L('submit')}" id="dosubmit" name="dosubmit" class="btn btn_submit" style="margin:0 0 10px 100px;"><br /><br /><br /></div>
	</div>
</div>
<input type="hidden" name="menuid"  value="{$menuid}"/>
<input type="hidden" name="id" id="id" value="{$info.id}" />
    <input type="hidden" name="isrec" value="{$info.isrec}" />
</form>
<include file="Public:footer" />
<js file="__STATIC__/ueditor/ueditor.config.js" charset="utf-8" />
<js file="__STATIC__/ueditor/ueditor.all.min.js" charset="utf-8" />
<js file="__STATIC__/ueditor/lang/zh-cn/zh-cn.js" charset="utf-8" />
<js file="__STATIC__/js/calendar/WdatePicker.js" charset="utf-8" />
<script src="__JS__/fileuploader.js"></script>
<script type="text/javascript">
    window.UEDITOR_HOME_URL='__STATIC__/ueditor/';
    window.onload=function(){
        window.UEDITOR_CONFIG.initialFrameWidth=880;
        window.UEDITOR_CONFIG.initialFrameHeight=500;
        UE.getEditor('info',{autoFloatEnabled:false});
       // UE.getEditor('special',{initialFrameWidth:880,initialFrameHeight:100,toolbars: [
        //    ['fullscreen', 'source', 'undo', 'redo', 'bold',"fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
       // ],autoFloatEnabled:false});
    }
</script>
<script type="text/javascript">
    $(function(){
        $('ul.J_tabs').tabs('div.J_panes > div');
        $('.J_cate_select').cate_select('请选择');
        $.formValidator.initConfig({formid:"info_form",autotip:true});
        $("#J_title").formValidator({onshow:"请填写楼盘名称",onfocus:"请填写楼盘名称"}).inputValidator({min:1,onerror:"请填写楼盘名称"});
        $("#J_price").formValidator({onshow:"楼盘均价只能填写数字(元/平米)",onfocus:"请填写楼盘均价"}).inputValidator({min:1,onerror:"请填写楼盘均价"}).regexValidator({regexp:"num1",datatype:"enum",onerror:"价格只能为数字"});
        $("#J_cate_id").formValidator({onshow:"请选择区域",onfocus:"请选择区域"}).regexValidator({regexp:"intege1",datatype:"enum",onerror:"请选择区域"});

    });
    //上传图片
    function ajaxUpload(ids,btn){
        var img_uploader = new qq.FileUploaderBasic({
            allowedExtensions: ['jpg','gif','jpeg','png','bmp','pdg'],
            button: document.getElementById(btn),
            multiple: false,
            action: "{:U('Business/ajax_upload_img')}",
            inputName: 'img',
            forceMultipart: true, //用$_FILES
            messages: {
                typeError: lang.upload_type_error,
                sizeError: lang.upload_size_error,
                minSizeError: lang.upload_minsize_error,
                emptyError: lang.upload_empty_error,
                noFilesError: lang.upload_nofile_error,
                onLeave: lang.upload_onLeave
            },
            showMessage: function(message){
                $.pinphp.tip({content:message, icon:'error'});
            },
            onSubmit: function(id, fileName){
                $('#'+btn).addClass('btn_disabled').find('span').text(lang.uploading);
            },
            onComplete: function(id, fileName, result){
                $('#'+btn).removeClass('btn_disabled').find('span').text(lang.upload);
                if(result.status == '1'){
                    $('#'+ids).val(result.data);
                } else {
                    $.pinphp.tip({content:result.msg, icon:'error'});
                }
            }
        });
    }
</script>
</body>
</html>